import { Component } from "react"

class TodoItem extends Component{
  constructor(props) {
    super(props);
    this.deleteItem = this.deleteItem.bind(this)
  }
  deleteItem () {
    const {deleteFunction,index} =this.props
    deleteFunction(index)
  }
  render () {
    const {content} =this.props
    return (<li onClick={this.deleteItem}>{content}</li>)
  }
}
export default TodoItem